#include <bits/stdc++.h>
using namespace std;
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
using ll = long long;
const ll N = 1010;
char g[N][N];
ll mp[N][N];
ll n, m;
ll dx[] = {-1, -1, -1, 0, 1, 1, 1, 0};
ll dy[] = {-1, 0, 1, 1, 1, 0, -1, -1};
void debug()
{
    cout << "debug" << endl;
}
struct rr
{
    ll x, y;
} ans[N];
ll cnt = 0;
void check(ll i, ll j)
{
    if(g[i][j]=='c') return ;
    bool ok = true;
    for (ll k = 0; k < 8; k++)
    {
        ll x = i + dx[k], y = j + dy[k];
        if (x < 1 || x > n || y < 1 || y > m)
            continue;
        if(g[x][y]=='c')
            ok = false;
    }
    if(ok)
    ans[cnt++] = {i, j};
}
bool cmp(rr a, rr b)
{
    if (a.x == b.x)
    {
        return a.y < b.y;
    }
    return a.x < b.x;
}
void solve()
{
    cin >> n >> m;
    // cout << n << m;
    for (ll i = 1; i <= n; i++)
    {
        for (ll j = 1; j <= m; j++)
        {
            cin >> g[i][j];
        }
    }

    // debug();
    for (ll i = 1; i <= n; i++)
    {
        for (ll j = 1; j <= m; j++)
        {
            if (g[i][j] == 'm')
            {
                mp[i][j] = 1;
                for (ll k = 0; k < 8; k++)
                {
                    ll x = i + dx[k], y = j + dy[k];
                    if (x < 1 || x > n || y < 1 || y > m)
                        continue;
                        if(g[x][y]=='w')
                    mp[x][y] = 1; // 1合法--温暖
                }
            }
        }
    }
    // debug();
    for (ll i = 1; i <= n; i++)
    {
        for (ll j = 1; j <= m; j++)
        {
            if(g[i][j]=='w'&&mp[i][j]==0)
            {
                for (ll k = 0; k < 8; k++)
                {
                    ll x = i + dx[k], y = j + dy[k];
                    {
                        if (x < 1 || x > n || y < 1 || y > m)
                            continue;
                        if(g[x][y]=='.'){
                            check(x,y);
                        }
                    }
                }
            }
        }
    }
    if(cnt==0)
    {
        cout<<"Too cold!";
        return;
    }
    sort(ans, ans + cnt, cmp);
    for (ll i = 0; i < cnt; i++)
    {
        cout << ans[i].x << " " << ans[i].y << endl;
    }
}
int main()
{
    int t = 1;
    // cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}
